package cn.lu.train.ui.dialog;

import android.view.Gravity;
import android.view.View;
import android.view.WindowManager;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.OnClick;
import cn.lu.train.R;
import cn.lu.train.base.BaseDialogFragment;

public class GoTipDialog extends BaseDialogFragment {

    private CharSequence addressName;

    @BindView(R.id.tv_address)
    TextView tvAddress;

    @Override
    public int getLayoutRes() {
        return R.layout.dialog_go_tip;
    }

    @Override
    public void onCreated(View layout) {
        tvAddress.setText(addressName);
    }

    @Override
    protected void setAttributes(WindowManager.LayoutParams params) {
        params.width = WindowManager.LayoutParams.MATCH_PARENT;
        params.height = WindowManager.LayoutParams.WRAP_CONTENT;
        params.gravity = Gravity.BOTTOM;
        super.setAttributes(params);
    }

    @OnClick({R.id.tv_amap,R.id.tv_baidu_map})
    public void onViewClick(View view) {
        switch (view.getId()) {
            case R.id.tv_amap:
                break;
            case R.id.tv_baidu_map:
                break;
        }
    }

    public void setAddressName(CharSequence addressName) {
        this.addressName = addressName;
    }
}
